// 用来封装登录注册，用户相关的接口
import request from '@/utils/request.js'
// 今后封装函数的时候，用API结尾
// function regAPI(obj) {
//   return request.post('/api/reg',obj)
// }
export const regAPI = obj => request.post('/api/reg', obj)

export const loginAPI = obj => request.post('/api/login', obj)

export const getUserInfoAPI = () => request.get('/my/userinfo')

export const getMenusAPI = () => request.get('/my/menus')

export const updateUseAPI = obj => request.put('/my/userinfo', obj)

export const updatePwdAPI = obj => request.patch('/my/updatepwd', obj)

export const updateAvatarAPI = obj => request.patch('/my/update/avatar', obj)
